//
//  YWPageTextImageTableViewCell.m
//  YWZhihuDaily
//
//  Created by NeiQuan on 16/9/19.
//  Copyright © 2016年 Mr-yuwei. All rights reserved.
//

#import "YWPageTextRightimageTableViewCell.h"

@interface YWPageTextRightimageTableViewCell()
{
    UILabel           *_titleLable;
    UIImageView       *_rightIamgeView;
}
@end
@implementation YWPageTextRightimageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        [self addSubViews];//添加子视图
    }
    return self;
}
-(void)addSubViews
{
    _rightIamgeView=[[UIImageView alloc] init];
    [self.contentView addSubview:_rightIamgeView];
    [_rightIamgeView mas_makeConstraints:^(MASConstraintMaker *make)
    {
        make.top.equalTo(self.contentView).with.offset(15.0f);
        make.right.equalTo(self.contentView).with.offset(-10.0f);
        make.height.mas_equalTo(60);
        make.width.mas_equalTo(70);
    }];
       [_rightIamgeView setImage:[UIImage imageNamed:@"Homescreen_Icon"]];
    
    _titleLable=[[UILabel alloc] init];
    [self.contentView addSubview:_titleLable];
    [_titleLable mas_makeConstraints:^(MASConstraintMaker *make)
     {
         make.right.equalTo(_rightIamgeView.mas_left);
         make.left.equalTo(self.contentView).with.offset(15.0f);
         make.centerY.equalTo(self.contentView);
    }];
    _titleLable.numberOfLines=0;
    _titleLable.text=@"yuweiweiwuueuweuueuruuruwuruwueruwreuuwreuwueuue";
}
@end
